package media.sound;

import com.game.R;

import android.content.Context;

public class SoundEffect {
	
	private Context context;
	private SoundEffectManager soundMgr;
	
	// Gun
	private static final int SOUND_MACHINEGUN_ID = 0;
	private static final int SOUND_FIREGUN_ID = 1;
	private static final int SOUND_ROCKET_ID = 2;
	private static final int SOUND_CHANGEGUN_ID = 3;
	
	// Die
	private static final int SOUND_PROTOSS_DIE_ID = 4;
	private static final int SOUND_TERMINATOR_DIE_ID = 5;
	private static final int SOUND_SKYDEATH_DIE_ID = 6;
	private static final int SOUND_SUPERHERO_DIE_ID = 7;
	
	// Explode
	private static final int SOUND_CANNON_FAR_ID = 8;
	private static final int SOUND_CANNON_CLOSE_ID = 9;
	private static final int SOUND_EX_BIG_ID = 10;
	private static final int SOUND_EX_CLOSE_ID = 11;
	private static final int SOUND_EX_FAR_ID = 12;
	private static final int SOUND_EX_HIT_ID = 13;
	private static final int SOUND_EX_MUFFLE_ID = 14;
	
	// Get dropped item
	private static final int SOUND_GET_DROPPEDITEM_ID = 15;
	
	// Menu Effect
	private static final int SOUND_CHANGE_MENU_ID = 16;
	private static final int SOUND_MENU_SELECT_ID = 17;

	public SoundEffect(Context context)
	{
		this.context = context;
		initSound();
	}
	
	private void initSound()
	{
		soundMgr = new SoundEffectManager();
		soundMgr.initSounds(context);
	}
	
	public void LoadIngameSound()
	{
		initSound();
	}
	
	public void LoadMachineGunSound()
	{
		soundMgr.addSound(SOUND_MACHINEGUN_ID, R.raw.soundeffect_machinegun);		
	}
	
	public void LoadFireGunSound()
	{
		soundMgr.addSound(SOUND_FIREGUN_ID, R.raw.sound_boss1);
	}
	
	public void LoadRocketSound()
	{
		soundMgr.addSound(SOUND_ROCKET_ID, R.raw.soundeffect_rocket);
	}
	
	public void LoadChangeGunSound()
	{
		soundMgr.addSound(SOUND_CHANGEGUN_ID, R.raw.sound_boss1);
	}
	
	public void LoadProtossDieSound()
	{
		soundMgr.addSound(SOUND_PROTOSS_DIE_ID, R.raw.alien_squeal03);
	}
	
	public void LoadTerminatorDieSound()
	{
		soundMgr.addSound(SOUND_TERMINATOR_DIE_ID, R.raw.aliengrowl_02);
	}
	
	public void LoadSkyDeathDieSound()
	{
		soundMgr.addSound(SOUND_SKYDEATH_DIE_ID, R.raw.aliengrowl_02);
	}
	
	
	public void LoadSuperHeroDieSound()
	{
		soundMgr.addSound(SOUND_SUPERHERO_DIE_ID, R.raw.sound_boss1);
	}
	
	
	public void LoadCannonFarSound()
	{
		soundMgr.addSound(SOUND_CANNON_FAR_ID, R.raw.soundeffect_cannon_far);
	}
	
	public void LoadCannonCloseSound()
	{
		soundMgr.addSound(SOUND_CANNON_CLOSE_ID, R.raw.soundeffect_cannon_close);
	}
	
	public void LoadExBigSound()
	{
		soundMgr.addSound(SOUND_EX_BIG_ID, R.raw.soundeffect_ex_big);
	}
	public void LoadExCloseSound()
	{
		soundMgr.addSound(SOUND_EX_CLOSE_ID, R.raw.soundeffect_ex_close);
	}
	public void LoadExFarSound()
	{
		soundMgr.addSound(SOUND_EX_FAR_ID, R.raw.soundeffect_ex_far);
	}
	
	public void LoadExHitSound()
	{
		soundMgr.addSound(SOUND_EX_HIT_ID, R.raw.soundeffect_ex_hit);
	}
	
	public void LoadExMuffleSound()
	{
		soundMgr.addSound(SOUND_EX_MUFFLE_ID, R.raw.soundeffect_ex_muffle);
	}
	
	public void LoadGetDroppedItemSound()
	{
		soundMgr.addSound(SOUND_GET_DROPPEDITEM_ID, R.raw.soundeffect_get_droppeditem);
	}
	
	public void LoadChangeMenuSound()
	{
		soundMgr.addSound(SOUND_CHANGE_MENU_ID, R.raw.soundeffect_change_menu);
	}
	
	public void LoadMenuSelectSound()
	{
		soundMgr.addSound(SOUND_MENU_SELECT_ID, R.raw.soundeffect_machinegun);
	}
	
	
	public void PlayMachineGun()
	{
		soundMgr.playSound(SOUND_MACHINEGUN_ID);
	}
	
	public void PlayFireGun()
	{
		soundMgr.playSound(SOUND_FIREGUN_ID);
	}
	
	public void PlayRocket()
	{
		soundMgr.playSound(SOUND_ROCKET_ID);
	}
	
	public void PlayChangeGun()
	{
		soundMgr.playSound(SOUND_CHANGEGUN_ID);
	}
	
	public void PlayProtossDie()
	{
		soundMgr.playSound(SOUND_PROTOSS_DIE_ID);
	}
	
	public void PlayTerminatorDie()
	{
		soundMgr.playSound(SOUND_TERMINATOR_DIE_ID);
	}
	
	public void PlaySkydeathDie()
	{
		soundMgr.playSound(SOUND_SKYDEATH_DIE_ID);
	}
	
	public void PlaySuperHeroDie()
	{
		soundMgr.playSound(SOUND_SUPERHERO_DIE_ID);
	}
	
	public void PlayCannonFar()
	{
		soundMgr.playSound(SOUND_CANNON_FAR_ID);
	}
	
	public void PlayCannonClose()
	{
		soundMgr.playSound(SOUND_CANNON_CLOSE_ID);
	}
	
	public void PlayExBig()
	{
		soundMgr.playSound(SOUND_EX_BIG_ID);
	}
	
	public void PlayExClose()
	{
		soundMgr.playSound(SOUND_EX_CLOSE_ID);
	}
	
	public void PlayExFar()
	{
		soundMgr.playSound(SOUND_EX_FAR_ID);
	}
	
	public void PlayExHit()
	{
		soundMgr.playSound(SOUND_EX_HIT_ID);
	}
	
	public void PlayExMuffle()
	{
		soundMgr.playSound(SOUND_EX_MUFFLE_ID);
	}
		
	public void PlayGetDroppedItem()
	{
		soundMgr.playSound(SOUND_GET_DROPPEDITEM_ID);
	}
	
	public void PlayChangeMenu()
	{
		soundMgr.playSound(SOUND_CHANGE_MENU_ID);
	}
	public void PlaySelectMenu()
	{
		soundMgr.playSound(SOUND_MENU_SELECT_ID);
	}
}
